import React from 'react'

import ReactDOM from 'react-dom/client'

// 如何封装组件

// 组件分为两类:
// 1. 类组件 2. 函数组件

// 定义类组件
class List extends React.Component {
  render() {
    return (
      <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
      </ul>
    )
  }
}
const div = (
  <div>
    ================================================================
    <List></List>
    <hr />
    <List />
  </div>
)

const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(div)
